package com.en.effectiveJava.chapter2.singleton3;

/**
 * 私有构造器, 公有的静态工厂方法实现 Singleton
 * Create by EN
 * On 24/05/18 4:36 PM
*/
public class StaticFactory {

    private static StaticFactory INSTANCE = new StaticFactory();

    private StaticFactory() {

    }

    public static StaticFactory getInstance() {
        return INSTANCE;
    }

    public void say() {
        System.out.printf("I'm StaticFactory, I'm built!\n");
    }

}
